package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @author hekr22831
 * @description
 * @date 2022/5/25.21:01
 */
@Entity(name = "FollowPlan")
@Table(name = "follow_plan")
public class FollowPlanEntity {
    /**随访计划Id*/
    private long followPlanId;
    /**院后随访id*/
    private Long fusPathRouteId;
    /**计划序号*/
    private Integer planNo;
    /**时间数*/
    private Integer timeNodeSize;
    /**时间类别*/
    private Byte timeNodeSizeUnit;
    /**创建时间*/
    private Date createDt;
    /**修改时间*/
    private Date modifiedDt;
    /**
     * 路径详细类型，1门诊复诊2入组评估3问卷随访4指标检测5医护随访6健康宣教 7健康检测 8住院记录
     */
    private Integer routeDetailType;

    @Id
    @Column(name = "follow_plan_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long getFollowPlanId() {
        return followPlanId;
    }

    public void setFollowPlanId(long followPlanId) {
        this.followPlanId = followPlanId;
    }

    @Basic
    @Column(name = "fus_path_route_id")
    public Long getFusPathRouteId() {
        return fusPathRouteId;
    }

    public void setFusPathRouteId(Long fusPathRouteId) {
        this.fusPathRouteId = fusPathRouteId;
    }

    @Basic
    @Column(name = "plan_no")
    public Integer getPlanNo() {
        return planNo;
    }

    public void setPlanNo(Integer planNo) {
        this.planNo = planNo;
    }

    @Basic
    @Column(name = "time_node_size")
    public Integer getTimeNodeSize() {
        return timeNodeSize;
    }

    public void setTimeNodeSize(Integer timeNodeSize) {
        this.timeNodeSize = timeNodeSize;
    }

    @Basic
    @Column(name = "time_node_size_unit")
    public Byte getTimeNodeSizeUnit() {
        return timeNodeSizeUnit;
    }

    public void setTimeNodeSizeUnit(Byte timeNodeSizeUnit) {
        this.timeNodeSizeUnit = timeNodeSizeUnit;
    }

    @Basic
    @Column(name = "create_dt")
    public Date getCreateDt() {
        return createDt;
    }

    public void setCreateDt(Date createDt) {
        this.createDt = createDt;
    }

    @Basic
    @Column(name = "modified_dt")
    public Date getModifiedDt() {
        return modifiedDt;
    }

    public void setModifiedDt(Date modifiedDt) {
        this.modifiedDt = modifiedDt;
    }

    @Basic
    @Column(name="route_detail_type")
    public Integer getRouteDetailType() {
        return routeDetailType;
    }

    public void setRouteDetailType(Integer routeDetailType) {
        this.routeDetailType = routeDetailType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FollowPlanEntity that = (FollowPlanEntity) o;
        return followPlanId == that.followPlanId &&
                Objects.equals(fusPathRouteId, that.fusPathRouteId) &&
                Objects.equals(planNo, that.planNo) &&
                Objects.equals(timeNodeSize, that.timeNodeSize) &&
                Objects.equals(timeNodeSizeUnit, that.timeNodeSizeUnit) &&
                Objects.equals(createDt, that.createDt) &&
                Objects.equals(modifiedDt, that.modifiedDt) &&
                Objects.equals(routeDetailType, that.routeDetailType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(followPlanId, fusPathRouteId, planNo, timeNodeSize, timeNodeSizeUnit, createDt, modifiedDt, routeDetailType);
    }
}
